package com.hlhj.funlike_business.presenter;

import android.content.Context;

import com.example.mymvp.mvp.BasePresenter;
import com.hlhj.funlike_business.bean.FoodListBean;
import com.hlhj.funlike_business.moudle.ShowFoodListFragmentMoudle;
import com.hlhj.funlike_business.views.ShowFoodListFragmentView;

import java.util.List;

public class ShowFoodListFragmentPresenter extends BasePresenter<ShowFoodListFragmentMoudle,ShowFoodListFragmentView> implements ShowFoodListFragmentMoudle.getFoodList {
    @Override
    public void createModule() {
        module = new ShowFoodListFragmentMoudle();
        module.setListener(this);
    }

    public void LoadFoodList(Context context, int type_id,int p,int num){
        module.LoadFoodList(context,type_id,p,num);
    }
    @Override
    public void LoadFoodList(List<FoodListBean.DataBeanX.DataBean> dataBeanXList) {
        getView().showFoodList(dataBeanXList);
    }
}
